Skip to content

feat(I3C): adding support for I3C#5

Open
Aymane-ST wants to merge 3 commits into
stm32duino:mainfrom
Aymane-ST:I3C
Open

feat(I3C): adding support for I3C#5
Aymane-ST wants to merge 3 commits into
stm32duino:mainfrom
Aymane-ST:I3C

Conversation

@Aymane-ST
Copy link
Copy Markdown

Summary

This PR adds I3C support to LPS22DFSensor.

Main additions

  • I3CBus-based constructor
  • I3C static address constants
  • LPS22DF PID constants
  • register read/write path through I3CBus
  • optional data-ready / IBI helpers

Implemented support

  • basic I3C register access using:
    • readRegBuffer(...)
    • writeRegBuffer(...)
  • support for either:
    • static + dynamic address flow
    • dynamic-address-only flow
  • helper APIs for enabling I3C IBI-based signaling

Files added / updated

  • CMakeLists.txt
  • src/LPS22DFSensor.cpp
  • src/LPS22DFSensor.h

Notes

This PR depends on the I3C Library PR ref:stm32duino/Arduino_Core_STM32#2963

Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
@Aymane-ST Aymane-ST requested review from cparata and fpistm April 24, 2026 15:10
@Aymane-ST Aymane-ST self-assigned this Apr 24, 2026
@fpistm fpistm added the enhancement New feature or request label Apr 27, 2026
Copy link
Copy Markdown
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend to add a check for the core version.

#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION  <= 0x020C0000)
  #error "This library is not compatible with core version used. Please update the core."
#endif

Copy link
Copy Markdown
Contributor

@cparata cparata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good To Me, but I would wait for an official release of the STM32duino Core that integrates the I3C support before integrating this PR. The only thing is about the file CMakeLists.txt: is it mandatory?

Comment thread src/lps22df_reg.h Outdated
@Aymane-ST
Copy link
Copy Markdown
Author

Looks Good To Me, but I would wait for an official release of the STM32duino Core that integrates the I3C support before integrating this PR. The only thing is about the file CMakeLists.txt: is it mandatory?

Hello Carlo, for the CMakeLists.tx is not really mandatory, it's just so the user can compile using CMake easily

@Aymane-ST Aymane-ST force-pushed the I3C branch 2 times, most recently from fc4b44c to 282f2b0 Compare April 27, 2026 12:59
Copy link
Copy Markdown
Contributor

@cparata cparata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Waiting for the official STM32duino Core release before integrating it.

Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
@@ -0,0 +1,55 @@
#include "I3C.h"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename all the I3C examples "LPS22DF_I3C_Basic.ino", "LPS22DF_I3C_DynAddrAssign.ino" and "LPS22DF_I3C_IBI.ino" putting them in the root of the "examples" folder and avoiding the inner folders. What about this proposal?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
Copy link
Copy Markdown
Contributor

@cparata cparata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants